﻿// Decompiled with JetBrains decompiler
// Type: DataTrace.App.MainForm
// Assembly: DataTrace.App, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 626B42CC-D912-405D-8BB1-A0EDDB371D86
// Assembly location: C:\Users\yudm\Desktop\DataTrace\sqlerpprofile\DataTrace.App.exe

using DataTrace.Config;
using DataTrace.Core;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Management;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.Layout;
using Youngk.PlatForm.DB;

namespace DataTrace.App
{
    public class MainForm : Form
    {
        private static Type[] EnabledControl = new Type[4]
        {
      typeof (Button),
      typeof (CheckBox),
      typeof (TextBox),
      typeof (ComboBox)
        };
        private IContainer components = (IContainer)null;
        private TraceHelper helper;
        private DateTime BeginTime;
        private TabControl tabControl1;
        private TabPage tp_exec;
        private GroupBox groupBox1;
        private Label label8;
        private ComboBox cb_reg;
        private TextBox tb_pw;
        private Label label4;
        private TextBox tb_user;
        private Label label3;
        private TextBox tb_db;
        private Label label2;
        private TextBox tb_server;
        private Label label1;
        private RichTextBox rtb_execinfo;
        private Button btn_release;
        private Button btn_trace;
        private Button btn_disable;
        private CheckBox cb_IsForce;
        private Label lb_mess;
        private Button btn_result;
        private TabPage tp_result;
        private TreeView tv_result;
        private CheckBox cb_ignoreProcess;
        private Button btn_rollback;
        private Button btn_clear;
        private TabPage tabPage1;
        private RichTextBox rtb_updatelog;
        private Button btn_begin;

        public MainForm()
        {
            this.InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;
            this.helper = new TraceHelper();
            this.helper.OnInitEnd += (StateChange)(() => this.SetMess("初始化成功", false));
            this.helper.OnProgressChanged += (SetMess)(p => this.SetMess("当前进度（" + p + "%）", true));
            this.helper.OnError += (SetMess)(mess => this.SetMess("异常：" + mess, false));
            this.helper.OnTraceTableBegin += (SetMess)(name => this.SetMess("正在处理表" + name, false));
            this.helper.OnRollBackTableChanged += (SetMess)(name => this.SetMess("正在处理表" + name, false));
            //this.Text = "数据跟踪" + ConfigHelper.GetInstance().Version;
        }

        private void cb_reg_SelectedIndexChanged(object sender, EventArgs e)
        {
            MainForm.RegDb selectedItem = (MainForm.RegDb)this.cb_reg.SelectedItem;
            this.tb_server.Text = selectedItem.ServerName;
            this.tb_db.Text = selectedItem.DBName;
            this.tb_user.Text = selectedItem.UserName;
            this.tb_pw.Text = MainForm.DeCode(selectedItem.SaPassword);
            this.InitConnectionString();
        }

        public static string DeCode(string inStr)
        {
            string str = "";
            int length = inStr.Trim().Length;
            int num1 = length % 3;
            int num2 = length % 9;
            int num3 = length % 5;
            int num4 = length % 2 != 0 ? num1 + num3 : num2 + num3;
            for (int index = 1; index <= length; ++index)
            {
                str += (string)(object)Convert.ToChar((int)Convert.ToInt16(inStr.Substring(length - index, 1).ToCharArray()[0]) + num4);
                num4 = num4 != num1 + num3 ? num1 + num3 : num2 + num3;
            }
            return str + new string(' ', inStr.Length - length);
        }

        public void InitConnectionString()
        {
            ConnectionScope.SetConnection("Data Source=" + this.tb_server.Text + ";Initial Catalog=" + this.tb_db.Text + ";User ID=" + this.tb_user.Text + ";Password=" + this.tb_pw.Text + ";");
        }

        private void btn_trace_Click(object sender, EventArgs e)
        {
            this.InitConnectionString();
            this.SetEnable(false);
            new Task((Action)(() =>
           {
               try
               {
                   if (!this.helper.CheckVersion())
                   {
                       this.helper.SQLInit();
                       this.SetMess("数据库对象初始化完成", true);
                   }
                   if (!this.helper.Init(this.cb_IsForce.Checked))
                       return;
                   this.SetMess("初始化成功，开始跟踪", true);
               }
               catch (Exception ex)
               {
                   this.SetMess(ex.ToString(), false);
               }
               finally
               {
                   this.SetEnable(true);
                   this.BeginTime = DateTime.Now;
               }
           })).Start();
        }

        private void SetEnable(bool enabled)
        {
            foreach (Control control in (ArrangedElementCollection)this.Controls)
                this.SetEnableSub(control, enabled);
        }

        private void SetEnableSub(Control parentcol, bool enabled)
        {
            foreach (Control control1 in (ArrangedElementCollection)parentcol.Controls)
            {
                Type type = control1.GetType();
                if (((IEnumerable<Type>)MainForm.EnabledControl).Contains<Type>(type))
                    control1.Enabled = enabled;
                foreach (Control control2 in (ArrangedElementCollection)control1.Controls)
                    this.SetEnableSub(control2, enabled);
            }
        }

        private void SetMess(string mess, bool isProgress = false)
        {
            if (!isProgress)
            {
                this.rtb_execinfo.AppendText(mess + "\r\n");
                this.rtb_execinfo.ScrollToCaret();
            }
            else
                this.lb_mess.Text = mess;
        }

        private void btn_result_Click(object sender, EventArgs e)
        {
            this.InitConnectionString();
            this.SetEnable(false);
            new Task((Action)(() =>
           {
               try
               {
                   this.tv_result.Nodes.Clear();
                   TraceResult traceResult = this.helper.GetTraceResult(this.cb_ignoreProcess.Checked, this.BeginTime, DateTime.Now);
                   if (traceResult == null)
                   {
                       this.SetMess("获取数据变化失败", false);
                   }
                   else
                   {
                       this.SetMess("获取数据变化成功", false);
                       TreeNode node1 = this.tv_result.Nodes[int.Parse(this.tv_result.Invoke((Delegate)new MainForm.AddNodeHandler(this.tv_result.Nodes.Add), (object)new TreeNode(traceResult.HostName + "(" + traceResult.BeginDate.ToString("yyyy-MM-dd HH:mm:ss") + ")")).ToString())];
                       node1.Expand();
                       foreach (TraceObject traceObject in traceResult.TraceObjects)
                       {
                           TreeNode node2 = node1.Nodes[int.Parse(this.tv_result.Invoke((Delegate)new MainForm.AddNodeHandler(node1.Nodes.Add), (object)new TreeNode(traceObject.Name + "(" + traceObject.CNName + ")," + traceObject.ChangedRows.Count.ToString())).ToString())];
                           node2.Expand();
                           foreach (TraceObjectRow changedRow in traceObject.ChangedRows)
                           {
                               StringBuilder stringBuilder = new StringBuilder();
                               List<string> stringList = new List<string>();
                               if (!string.IsNullOrEmpty(traceObject.PKName))
                                   stringList = ((IEnumerable<string>)traceObject.PKName.Split(',')).ToList<string>();
                               for (int index = 0; index < stringList.Count; ++index)
                               {
                                   if (index != 0)
                                       stringBuilder.Append(",");
                                   else
                                       stringBuilder.Append("行");
                                   stringBuilder.Append(stringList[index] + "='" + changedRow.PKValues[stringList[index]].ToString() + "'");
                               }
                               if (stringList.Count > 0)
                                   stringBuilder.Append("，");
                               stringBuilder.Append(Enum.GetName(typeof(OperateType), (object)changedRow.Operate));
                               TreeNode node3 = node2.Nodes[int.Parse(this.tv_result.Invoke((Delegate)new MainForm.AddNodeHandler(node2.Nodes.Add), (object)new TreeNode(stringBuilder.ToString())).ToString())];
                               foreach (TraceObjectAttribute changedAttribute in changedRow.ChangedAttributes)
                               {
                                   switch (changedRow.Operate)
                                   {
                                       case OperateType.Insert:
                                           this.tv_result.Invoke((Delegate)new MainForm.AddNodeHandler(node3.Nodes.Add), (object)new TreeNode(changedAttribute.Name + "(" + changedAttribute.CNName + "：" + changedAttribute.NewValue.ToString()));
                                           break;
                                       case OperateType.Delete:
                                           this.tv_result.Invoke((Delegate)new MainForm.AddNodeHandler(node3.Nodes.Add), (object)new TreeNode(changedAttribute.Name + "(" + changedAttribute.CNName + ")：" + changedAttribute.OldValue.ToString()));
                                           break;
                                       default:
                                           this.tv_result.Invoke((Delegate)new MainForm.AddNodeHandler(node3.Nodes.Add), (object)new TreeNode(changedAttribute.Name + "(" + changedAttribute.CNName + ")：" + changedAttribute.OldValue.ToString() + "->" + changedAttribute.NewValue.ToString()));
                                           break;
                                   }
                               }
                           }
                       }
                   }
               }
               catch (Exception ex)
               {
                   this.SetMess(ex.ToString(), false);
               }
               finally
               {
                   this.SetEnable(true);
               }
           })).Start(TaskScheduler.Current);
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                this.rtb_updatelog.AppendText(File.ReadAllText(ConfigHelper._dic + "explain.txt"));
                List<MainForm.RegDb> regDbList = new List<MainForm.RegDb>();
                RegistryKey registryKey1 = Registry.LocalMachine.OpenSubKey("SOFTWARE", false);
                if (MainForm.Distinguish64or32System() == "64")
                    registryKey1 = registryKey1.OpenSubKey("Wow6432Node", false);
                RegistryKey registryKey2 = registryKey1.OpenSubKey("mysoft", false);
                if (registryKey2 != null)
                {
                    foreach (string subKeyName in registryKey2.GetSubKeyNames())
                    {
                        RegistryKey registryKey3 = registryKey2.OpenSubKey(subKeyName, false);
                        string[] valueNames = registryKey3.GetValueNames();
                        if (((IEnumerable<string>)valueNames).Contains<string>("ServerName") && ((IEnumerable<string>)valueNames).Contains<string>("DBName") && ((IEnumerable<string>)valueNames).Contains<string>("UserName") && ((IEnumerable<string>)valueNames).Contains<string>("SaPassword"))
                            this.cb_reg.Items.Add((object)new MainForm.RegDb()
                            {
                                RegName = subKeyName,
                                ServerName = registryKey3.GetValue("ServerName").ToString(),
                                DBName = registryKey3.GetValue("DBName").ToString(),
                                UserName = registryKey3.GetValue("UserName").ToString(),
                                SaPassword = registryKey3.GetValue("SaPassword").ToString()
                            });
                    }
                    this.cb_reg.DisplayMember = "RegName";
                }
            }
            catch
            {
            }
            this.BeginTime = DateTime.Now;
        }

        public static string Distinguish64or32System()
        {
            try
            {
                string empty = string.Empty;
                foreach (ManagementBaseObject managementBaseObject in new ManagementObjectSearcher(new ManagementScope("\\\\localhost", new ConnectionOptions()), new ObjectQuery("select AddressWidth from Win32_Processor")).Get())
                    empty = managementBaseObject["AddressWidth"].ToString();
                return empty;
            }
            catch
            {
            }
            return "32";
        }

        private void btn_release_Click(object sender, EventArgs e)
        {
            this.helper.Release();
        }

        private void btn_disable_Click(object sender, EventArgs e)
        {
            this.InitConnectionString();
            this.SetEnable(false);
            new Task((Action)(() =>
           {
               try
               {
                   if (!this.helper.Disable())
                       return;
                   this.SetMess("卸载成功！", true);
               }
               catch (Exception ex)
               {
                   this.SetMess(ex.ToString(), false);
               }
               finally
               {
                   this.SetEnable(true);
               }
           })).Start();
        }

        private void btn_rollback_Click(object sender, EventArgs e)
        {
            this.InitConnectionString();
            this.SetEnable(false);
            new Task((Action)(() =>
           {
               try
               {
                   if (this.helper.RollBack())
                       this.SetMess("回滚成功！", false);
                   else
                       this.SetMess("回滚失败！", false);
               }
               catch (Exception ex)
               {
                   this.SetMess(ex.ToString(), false);
               }
               finally
               {
                   this.SetEnable(true);
               }
           })).Start();
        }

        private void btn_clear_Click(object sender, EventArgs e)
        {
            this.rtb_execinfo.Clear();
            this.lb_mess.Text = "";
        }

        private void btn_begin_Click(object sender, EventArgs e)
        {
            this.BeginTime = DateTime.Now;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && this.components != null)
                this.components.Dispose();
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(MainForm));
            this.tabControl1 = new TabControl();
            this.tp_exec = new TabPage();
            this.btn_clear = new Button();
            this.lb_mess = new Label();
            this.rtb_execinfo = new RichTextBox();
            this.groupBox1 = new GroupBox();
            this.btn_begin = new Button();
            this.btn_rollback = new Button();
            this.cb_ignoreProcess = new CheckBox();
            this.btn_result = new Button();
            this.btn_disable = new Button();
            this.cb_IsForce = new CheckBox();
            this.btn_release = new Button();
            this.btn_trace = new Button();
            this.label8 = new Label();
            this.cb_reg = new ComboBox();
            this.tb_pw = new TextBox();
            this.label4 = new Label();
            this.tb_user = new TextBox();
            this.label3 = new Label();
            this.tb_db = new TextBox();
            this.label2 = new Label();
            this.tb_server = new TextBox();
            this.label1 = new Label();
            this.tp_result = new TabPage();
            this.tv_result = new TreeView();
            this.tabPage1 = new TabPage();
            this.rtb_updatelog = new RichTextBox();
            this.tabControl1.SuspendLayout();
            this.tp_exec.SuspendLayout();
            this.groupBox1.SuspendLayout();
            this.tp_result.SuspendLayout();
            this.tabPage1.SuspendLayout();
            this.SuspendLayout();
            this.tabControl1.Controls.Add((Control)this.tp_exec);
            this.tabControl1.Controls.Add((Control)this.tp_result);
            this.tabControl1.Controls.Add((Control)this.tabPage1);
            this.tabControl1.Dock = DockStyle.Fill;
            this.tabControl1.Location = new Point(0, 0);
            this.tabControl1.Name = "tabControl1";
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new Size(751, 404);
            this.tabControl1.TabIndex = 1;
            this.tp_exec.Controls.Add((Control)this.btn_clear);
            this.tp_exec.Controls.Add((Control)this.lb_mess);
            this.tp_exec.Controls.Add((Control)this.rtb_execinfo);
            this.tp_exec.Controls.Add((Control)this.groupBox1);
            this.tp_exec.Location = new Point(4, 22);
            this.tp_exec.Name = "tp_exec";
            this.tp_exec.Padding = new Padding(3);
            this.tp_exec.Size = new Size(743, 378);
            this.tp_exec.TabIndex = 1;
            this.tp_exec.Text = "执行";
            this.tp_exec.UseVisualStyleBackColor = true;
            this.btn_clear.Location = new Point(660, 117);
            this.btn_clear.Name = "btn_clear";
            this.btn_clear.Size = new Size(75, 23);
            this.btn_clear.TabIndex = 5;
            this.btn_clear.Text = "清 空";
            this.btn_clear.UseVisualStyleBackColor = true;
            this.btn_clear.Click += new EventHandler(this.btn_clear_Click);
            this.lb_mess.AutoSize = true;
            this.lb_mess.Location = new Point(6, 122);
            this.lb_mess.Name = "lb_mess";
            this.lb_mess.Size = new Size(0, 12);
            this.lb_mess.TabIndex = 4;
            this.rtb_execinfo.Dock = DockStyle.Bottom;
            this.rtb_execinfo.Location = new Point(3, 143);
            this.rtb_execinfo.Name = "rtb_execinfo";
            this.rtb_execinfo.ReadOnly = true;
            this.rtb_execinfo.Size = new Size(737, 232);
            this.rtb_execinfo.TabIndex = 3;
            this.rtb_execinfo.Text = "";
            this.groupBox1.Controls.Add((Control)this.btn_begin);
            this.groupBox1.Controls.Add((Control)this.btn_rollback);
            this.groupBox1.Controls.Add((Control)this.cb_ignoreProcess);
            this.groupBox1.Controls.Add((Control)this.btn_result);
            this.groupBox1.Controls.Add((Control)this.btn_disable);
            this.groupBox1.Controls.Add((Control)this.cb_IsForce);
            this.groupBox1.Controls.Add((Control)this.btn_release);
            this.groupBox1.Controls.Add((Control)this.btn_trace);
            this.groupBox1.Controls.Add((Control)this.label8);
            this.groupBox1.Controls.Add((Control)this.cb_reg);
            this.groupBox1.Controls.Add((Control)this.tb_pw);
            this.groupBox1.Controls.Add((Control)this.label4);
            this.groupBox1.Controls.Add((Control)this.tb_user);
            this.groupBox1.Controls.Add((Control)this.label3);
            this.groupBox1.Controls.Add((Control)this.tb_db);
            this.groupBox1.Controls.Add((Control)this.label2);
            this.groupBox1.Controls.Add((Control)this.tb_server);
            this.groupBox1.Controls.Add((Control)this.label1);
            this.groupBox1.Dock = DockStyle.Top;
            this.groupBox1.Location = new Point(3, 3);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new Size(737, 112);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "功能区";
            this.btn_begin.Location = new Point(399, 68);
            this.btn_begin.Name = "btn_begin";
            this.btn_begin.Size = new Size(75, 38);
            this.btn_begin.TabIndex = 19;
            this.btn_begin.Text = "开始跟踪";
            this.btn_begin.UseVisualStyleBackColor = true;
            this.btn_begin.Click += new EventHandler(this.btn_begin_Click);
            this.btn_rollback.Location = new Point(657, 68);
            this.btn_rollback.Name = "btn_rollback";
            this.btn_rollback.Size = new Size(75, 38);
            this.btn_rollback.TabIndex = 18;
            this.btn_rollback.Text = "数据回滚";
            this.btn_rollback.UseVisualStyleBackColor = true;
            this.btn_rollback.Click += new EventHandler(this.btn_rollback_Click);
            this.cb_ignoreProcess.AutoSize = true;
            this.cb_ignoreProcess.Checked = true;
            this.cb_ignoreProcess.CheckState = CheckState.Checked;
            this.cb_ignoreProcess.Location = new Point(561, 90);
            this.cb_ignoreProcess.Name = "cb_ignoreProcess";
            this.cb_ignoreProcess.Size = new Size(96, 16);
            this.cb_ignoreProcess.TabIndex = 16;
            this.cb_ignoreProcess.Text = "忽略变化过程";
            this.cb_ignoreProcess.UseVisualStyleBackColor = true;
            this.btn_result.Location = new Point(480, 68);
            this.btn_result.Name = "btn_result";
            this.btn_result.Size = new Size(75, 38);
            this.btn_result.TabIndex = 15;
            this.btn_result.Text = "获取变化";
            this.btn_result.UseVisualStyleBackColor = true;
            this.btn_result.Click += new EventHandler(this.btn_result_Click);
            this.btn_disable.Location = new Point(657, 40);
            this.btn_disable.Name = "btn_disable";
            this.btn_disable.Size = new Size(75, 22);
            this.btn_disable.TabIndex = 14;
            this.btn_disable.Text = "卸载跟踪";
            this.btn_disable.UseVisualStyleBackColor = true;
            this.btn_disable.Click += new EventHandler(this.btn_disable_Click);
            this.cb_IsForce.AutoSize = true;
            this.cb_IsForce.Location = new Point(561, 44);
            this.cb_IsForce.Name = "cb_IsForce";
            this.cb_IsForce.Size = new Size(72, 16);
            this.cb_IsForce.TabIndex = 13;
            this.cb_IsForce.Text = "强制跟踪";
            this.cb_IsForce.UseVisualStyleBackColor = true;
            this.btn_release.Location = new Point(656, 12);
            this.btn_release.Name = "btn_release";
            this.btn_release.Size = new Size(75, 23);
            this.btn_release.TabIndex = 12;
            this.btn_release.Text = "释放跟踪";
            this.btn_release.UseVisualStyleBackColor = true;
            this.btn_release.Click += new EventHandler(this.btn_release_Click);
            this.btn_trace.Location = new Point(480, 12);
            this.btn_trace.Name = "btn_trace";
            this.btn_trace.Size = new Size(75, 50);
            this.btn_trace.TabIndex = 11;
            this.btn_trace.Text = "初始化跟踪";
            this.btn_trace.UseVisualStyleBackColor = true;
            this.btn_trace.Click += new EventHandler(this.btn_trace_Click);
            this.label8.AutoSize = true;
            this.label8.Location = new Point(5, 79);
            this.label8.Name = "label8";
            this.label8.Size = new Size(149, 12);
            this.label8.TabIndex = 10;
            this.label8.Text = "从注册表加载数据库信息：";
            this.cb_reg.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cb_reg.FormattingEnabled = true;
            this.cb_reg.Location = new Point(156, 76);
            this.cb_reg.Name = "cb_reg";
            this.cb_reg.Size = new Size(223, 20);
            this.cb_reg.TabIndex = 9;
            this.cb_reg.SelectedIndexChanged += new EventHandler(this.cb_reg_SelectedIndexChanged);
            this.tb_pw.Location = new Point(315, 41);
            this.tb_pw.Name = "tb_pw";
            this.tb_pw.Size = new Size(159, 21);
            this.tb_pw.TabIndex = 7;
            this.label4.AutoSize = true;
            this.label4.Location = new Point(256, 44);
            this.label4.Name = "label4";
            this.label4.Size = new Size(41, 12);
            this.label4.TabIndex = 6;
            this.label4.Text = "密码：";
            this.tb_user.Location = new Point(81, 41);
            this.tb_user.Name = "tb_user";
            this.tb_user.Size = new Size(159, 21);
            this.tb_user.TabIndex = 5;
            this.label3.AutoSize = true;
            this.label3.Location = new Point(22, 44);
            this.label3.Name = "label3";
            this.label3.Size = new Size(53, 12);
            this.label3.TabIndex = 4;
            this.label3.Text = "用户名：";
            this.tb_db.Location = new Point(315, 14);
            this.tb_db.Name = "tb_db";
            this.tb_db.Size = new Size(159, 21);
            this.tb_db.TabIndex = 3;
            this.label2.AutoSize = true;
            this.label2.Location = new Point(256, 17);
            this.label2.Name = "label2";
            this.label2.Size = new Size(53, 12);
            this.label2.TabIndex = 2;
            this.label2.Text = "数据库：";
            this.tb_server.Location = new Point(81, 14);
            this.tb_server.Name = "tb_server";
            this.tb_server.Size = new Size(159, 21);
            this.tb_server.TabIndex = 1;
            this.label1.AutoSize = true;
            this.label1.Location = new Point(22, 17);
            this.label1.Name = "label1";
            this.label1.Size = new Size(53, 12);
            this.label1.TabIndex = 0;
            this.label1.Text = "服务器：";
            this.tp_result.Controls.Add((Control)this.tv_result);
            this.tp_result.Location = new Point(4, 22);
            this.tp_result.Name = "tp_result";
            this.tp_result.Padding = new Padding(3);
            this.tp_result.Size = new Size(743, 378);
            this.tp_result.TabIndex = 2;
            this.tp_result.Text = "变化结果展示";
            this.tp_result.UseVisualStyleBackColor = true;
            this.tv_result.Dock = DockStyle.Fill;
            this.tv_result.Location = new Point(3, 3);
            this.tv_result.Name = "tv_result";
            this.tv_result.Size = new Size(737, 372);
            this.tv_result.TabIndex = 0;
            this.tabPage1.Controls.Add((Control)this.rtb_updatelog);
            this.tabPage1.Location = new Point(4, 22);
            this.tabPage1.Name = "tabPage1";
            this.tabPage1.Padding = new Padding(3);
            this.tabPage1.Size = new Size(743, 378);
            this.tabPage1.TabIndex = 3;
            this.tabPage1.Text = "更新说明";
            this.tabPage1.UseVisualStyleBackColor = true;
            this.rtb_updatelog.Dock = DockStyle.Fill;
            this.rtb_updatelog.Location = new Point(3, 3);
            this.rtb_updatelog.Name = "rtb_updatelog";
            this.rtb_updatelog.ReadOnly = true;
            this.rtb_updatelog.Size = new Size(737, 372);
            this.rtb_updatelog.TabIndex = 0;
            this.rtb_updatelog.Text = "";
            this.AutoScaleDimensions = new SizeF(6f, 12f);
            this.AutoScaleMode = AutoScaleMode.Font;
            this.ClientSize = new Size(751, 404);
            this.Controls.Add((Control)this.tabControl1);
            this.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
            this.MaximizeBox = false;
            this.MaximumSize = new Size(767, 442);
            this.MinimumSize = new Size(767, 442);
            this.Name = nameof(MainForm);
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "数据跟踪";
            this.Load += new EventHandler(this.MainForm_Load);
            this.tabControl1.ResumeLayout(false);
            this.tp_exec.ResumeLayout(false);
            this.tp_exec.PerformLayout();
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.tp_result.ResumeLayout(false);
            this.tabPage1.ResumeLayout(false);
            this.ResumeLayout(false);
        }

        private class RegDb
        {
            public string RegName { get; set; }

            public string ServerName { get; set; }

            public string DBName { get; set; }

            public string UserName { get; set; }

            public string SaPassword { get; set; }
        }

        private delegate int AddNodeHandler(TreeNode node);
    }
}
